module.exports = function($scope, $resource){

	console.log('config');

	$scope.configure = {};

	$resource('/api/as/wc/configure/info', {}, {}).save({}, function (res) {
		console.log(res);

		if (res.errcode !== 0) {
			alert(res.errmsg);
			return;
		}
		$scope.configure = res.data;
    });


    //----------- 保存 ------------------------------//
	$scope.gogogo = function(){

		$resource('/api/as/wc/configure/create', {}, {}).save($scope.configure, function (res) {

          if (res.errcode !== 0) {
            alert(res.errmsg);
            return;
          }
          alert('保存成功');
          $scope.load();
        });
	};
	//----------- 保存------------------------------//



};
